Optimal. Leaf size=179 \[ -\frac{2 \cot ^9(c+d x)}{9 a^2 d}+\frac{\cot ^7(c+d x)}{7 a^2 d}-\frac{\cot ^5(c+d x)}{5 a^2 d}+\frac{\cot ^3(c+d x)}{3 a^2 d}-\frac{\cot (c+d x)}{a^2 d}+\frac{2 \csc ^9(c+d x)}{9 a^2 d}-\frac{8 \csc ^7(c+d x)}{7 a^2 d}+\frac{12 \csc ^5(c+d x)}{5 a^2 d}-\frac{8 \csc ^3(c+d x)}{3 a^2 d}+\frac{2 \csc (c+d x)}{a^2 d}-\frac{x}{a^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.207881, antiderivative size = 179, normalized size of antiderivative = 1., number of steps used = 14, number of rules used = 8, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.381, Rules used = {3888, 3886, 3473, 8, 2606, 194, 2607, 30} \[ -\frac{2 \cot ^9(c+d x)}{9 a^2 d}+\frac{\cot ^7(c+d x)}{7 a^2 d}-\frac{\cot ^5(c+d x)}{5 a^2 d}+\frac{\cot ^3(c+d x)}{3 a^2 d}-\frac{\cot (c+d x)}{a^2 d}+\frac{2 \csc ^9(c+d x)}{9 a^2 d}-\frac{8 \csc ^7(c+d x)}{7 a^2 d}+\frac{12 \csc ^5(c+d x)}{5 a^2 d}-\frac{8 \csc ^3(c+d x)}{3 a^2 d}+\frac{2 \csc (c+d x)}{a^2 d}-\frac{x}{a^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3888
Rule 3886
Rule 3473
Rule 8
Rule 2606
Rule 194
Rule 2607
Rule 30
Rubi steps
\begin{align*} \int \frac{\cot ^6(c+d x)}{(a+a \sec (c+d x))^2} \, dx &=\frac{\int \cot ^{10}(c+d x) (-a+a \sec (c+d x))^2 \, dx}{a^4}\\ &=\frac{\int \left (a^2 \cot ^{10}(c+d x)-2 a^2 \cot ^9(c+d x) \csc (c+d x)+a^2 \cot ^8(c+d x) \csc ^2(c+d x)\right ) \, dx}{a^4}\\ &=\frac{\int \cot ^{10}(c+d x) \, dx}{a^2}+\frac{\int \cot ^8(c+d x) \csc ^2(c+d x) \, dx}{a^2}-\frac{2 \int \cot ^9(c+d x) \csc (c+d x) \, dx}{a^2}\\ &=-\frac{\cot ^9(c+d x)}{9 a^2 d}-\frac{\int \cot ^8(c+d x) \, dx}{a^2}+\frac{\operatorname{Subst}\left (\int x^8 \, dx,x,-\cot (c+d x)\right )}{a^2 d}+\frac{2 \operatorname{Subst}\left (\int \left (-1+x^2\right )^4 \, dx,x,\csc (c+d x)\right )}{a^2 d}\\ &=\frac{\cot ^7(c+d x)}{7 a^2 d}-\frac{2 \cot ^9(c+d x)}{9 a^2 d}+\frac{\int \cot ^6(c+d x) \, dx}{a^2}+\frac{2 \operatorname{Subst}\left (\int \left (1-4 x^2+6 x^4-4 x^6+x^8\right ) \, dx,x,\csc (c+d x)\right )}{a^2 d}\\ &=-\frac{\cot ^5(c+d x)}{5 a^2 d}+\frac{\cot ^7(c+d x)}{7 a^2 d}-\frac{2 \cot ^9(c+d x)}{9 a^2 d}+\frac{2 \csc (c+d x)}{a^2 d}-\frac{8 \csc ^3(c+d x)}{3 a^2 d}+\frac{12 \csc ^5(c+d x)}{5 a^2 d}-\frac{8 \csc ^7(c+d x)}{7 a^2 d}+\frac{2 \csc ^9(c+d x)}{9 a^2 d}-\frac{\int \cot ^4(c+d x) \, dx}{a^2}\\ &=\frac{\cot ^3(c+d x)}{3 a^2 d}-\frac{\cot ^5(c+d x)}{5 a^2 d}+\frac{\cot ^7(c+d x)}{7 a^2 d}-\frac{2 \cot ^9(c+d x)}{9 a^2 d}+\frac{2 \csc (c+d x)}{a^2 d}-\frac{8 \csc ^3(c+d x)}{3 a^2 d}+\frac{12 \csc ^5(c+d x)}{5 a^2 d}-\frac{8 \csc ^7(c+d x)}{7 a^2 d}+\frac{2 \csc ^9(c+d x)}{9 a^2 d}+\frac{\int \cot ^2(c+d x) \, dx}{a^2}\\ &=-\frac{\cot (c+d x)}{a^2 d}+\frac{\cot ^3(c+d x)}{3 a^2 d}-\frac{\cot ^5(c+d x)}{5 a^2 d}+\frac{\cot ^7(c+d x)}{7 a^2 d}-\frac{2 \cot ^9(c+d x)}{9 a^2 d}+\frac{2 \csc (c+d x)}{a^2 d}-\frac{8 \csc ^3(c+d x)}{3 a^2 d}+\frac{12 \csc ^5(c+d x)}{5 a^2 d}-\frac{8 \csc ^7(c+d x)}{7 a^2 d}+\frac{2 \csc ^9(c+d x)}{9 a^2 d}-\frac{\int 1 \, dx}{a^2}\\ &=-\frac{x}{a^2}-\frac{\cot (c+d x)}{a^2 d}+\frac{\cot ^3(c+d x)}{3 a^2 d}-\frac{\cot ^5(c+d x)}{5 a^2 d}+\frac{\cot ^7(c+d x)}{7 a^2 d}-\frac{2 \cot ^9(c+d x)}{9 a^2 d}+\frac{2 \csc (c+d x)}{a^2 d}-\frac{8 \csc ^3(c+d x)}{3 a^2 d}+\frac{12 \csc ^5(c+d x)}{5 a^2 d}-\frac{8 \csc ^7(c+d x)}{7 a^2 d}+\frac{2 \csc ^9(c+d x)}{9 a^2 d}\\ \end{align*}
Mathematica [B] time = 6.57088, size = 802, normalized size = 4.48 \[ \frac{\sec \left (\frac{c}{2}\right ) \sec ^2(c+d x) \sin \left (\frac{d x}{2}\right ) \sec ^5\left (\frac{c}{2}+\frac{d x}{2}\right )}{288 d (\sec (c+d x) a+a)^2}+\frac{\sec ^2(c+d x) \tan \left (\frac{c}{2}\right ) \sec ^4\left (\frac{c}{2}+\frac{d x}{2}\right )}{288 d (\sec (c+d x) a+a)^2}-\frac{109 \sec \left (\frac{c}{2}\right ) \sec ^2(c+d x) \sin \left (\frac{d x}{2}\right ) \sec ^3\left (\frac{c}{2}+\frac{d x}{2}\right )}{2016 d (\sec (c+d x) a+a)^2}-\frac{109 \sec ^2(c+d x) \tan \left (\frac{c}{2}\right ) \sec ^2\left (\frac{c}{2}+\frac{d x}{2}\right )}{2016 d (\sec (c+d x) a+a)^2}+\frac{313 \sec \left (\frac{c}{2}\right ) \sec ^2(c+d x) \sin \left (\frac{d x}{2}\right ) \sec \left (\frac{c}{2}+\frac{d x}{2}\right )}{840 d (\sec (c+d x) a+a)^2}-\frac{17 \cos \left (\frac{c}{2}+\frac{d x}{2}\right ) \cot ^3\left (\frac{c}{2}+\frac{d x}{2}\right ) \csc \left (\frac{c}{2}\right ) \sec ^2(c+d x) \sin \left (\frac{d x}{2}\right )}{160 d (\sec (c+d x) a+a)^2}+\frac{201 \cos ^3\left (\frac{c}{2}+\frac{d x}{2}\right ) \cot \left (\frac{c}{2}+\frac{d x}{2}\right ) \csc \left (\frac{c}{2}\right ) \sec ^2(c+d x) \sin \left (\frac{d x}{2}\right )}{160 d (\sec (c+d x) a+a)^2}+\frac{\cot ^4\left (\frac{c}{2}+\frac{d x}{2}\right ) \csc \left (\frac{c}{2}\right ) \csc \left (\frac{c}{2}+\frac{d x}{2}\right ) \sec ^2(c+d x) \sin \left (\frac{d x}{2}\right )}{160 d (\sec (c+d x) a+a)^2}+\frac{63881 \cos ^3\left (\frac{c}{2}+\frac{d x}{2}\right ) \sec \left (\frac{c}{2}\right ) \sec ^2(c+d x) \sin \left (\frac{d x}{2}\right )}{10080 d (\sec (c+d x) a+a)^2}-\frac{7891 \cos \left (\frac{c}{2}+\frac{d x}{2}\right ) \sec \left (\frac{c}{2}\right ) \sec ^2(c+d x) \sin \left (\frac{d x}{2}\right )}{5040 d (\sec (c+d x) a+a)^2}-\frac{7891 \cos ^2\left (\frac{c}{2}+\frac{d x}{2}\right ) \sec ^2(c+d x) \tan \left (\frac{c}{2}\right )}{5040 d (\sec (c+d x) a+a)^2}+\frac{313 \sec ^2(c+d x) \tan \left (\frac{c}{2}\right )}{840 d (\sec (c+d x) a+a)^2}-\frac{4 x \cos ^4\left (\frac{c}{2}+\frac{d x}{2}\right ) \sec ^2(c+d x)}{(\sec (c+d x) a+a)^2}-\frac{\cot \left (\frac{c}{2}\right ) \cot ^4\left (\frac{c}{2}+\frac{d x}{2}\right ) \sec ^2(c+d x)}{160 d (\sec (c+d x) a+a)^2}+\frac{17 \cos ^2\left (\frac{c}{2}+\frac{d x}{2}\right ) \cot \left (\frac{c}{2}\right ) \cot ^2\left (\frac{c}{2}+\frac{d x}{2}\right ) \sec ^2(c+d x)}{160 d (\sec (c+d x) a+a)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.074, size = 170, normalized size = 1. \begin{align*}{\frac{1}{1152\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{9}}-{\frac{9}{896\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{7}}+{\frac{37}{640\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{5}}-{\frac{31}{128\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{3}}+{\frac{163}{128\,d{a}^{2}}\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) }-2\,{\frac{\arctan \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) }{d{a}^{2}}}-{\frac{1}{640\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-5}}+{\frac{3}{128\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-3}}-{\frac{37}{128\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-1}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.7423, size = 266, normalized size = 1.49 \begin{align*} \frac{\frac{\frac{51345 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac{9765 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac{2331 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac{405 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} + \frac{35 \, \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}}}{a^{2}} - \frac{80640 \, \arctan \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} + \frac{63 \,{\left (\frac{15 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac{185 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - 1\right )}{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}{a^{2} \sin \left (d x + c\right )^{5}}}{40320 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.26167, size = 651, normalized size = 3.64 \begin{align*} -\frac{598 \, \cos \left (d x + c\right )^{7} + 566 \, \cos \left (d x + c\right )^{6} - 1212 \, \cos \left (d x + c\right )^{5} - 1310 \, \cos \left (d x + c\right )^{4} + 860 \, \cos \left (d x + c\right )^{3} + 1014 \, \cos \left (d x + c\right )^{2} + 315 \,{\left (d x \cos \left (d x + c\right )^{6} + 2 \, d x \cos \left (d x + c\right )^{5} - d x \cos \left (d x + c\right )^{4} - 4 \, d x \cos \left (d x + c\right )^{3} - d x \cos \left (d x + c\right )^{2} + 2 \, d x \cos \left (d x + c\right ) + d x\right )} \sin \left (d x + c\right ) - 197 \, \cos \left (d x + c\right ) - 256}{315 \,{\left (a^{2} d \cos \left (d x + c\right )^{6} + 2 \, a^{2} d \cos \left (d x + c\right )^{5} - a^{2} d \cos \left (d x + c\right )^{4} - 4 \, a^{2} d \cos \left (d x + c\right )^{3} - a^{2} d \cos \left (d x + c\right )^{2} + 2 \, a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )} \sin \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.32933, size = 194, normalized size = 1.08 \begin{align*} -\frac{\frac{40320 \,{\left (d x + c\right )}}{a^{2}} + \frac{63 \,{\left (185 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 15 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right )}}{a^{2} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5}} - \frac{35 \, a^{16} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{9} - 405 \, a^{16} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} + 2331 \, a^{16} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} - 9765 \, a^{16} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 51345 \, a^{16} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{a^{18}}}{40320 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]